<?php 
require_once BASE_PATH.'application/models/basedao'.EXT;

class EstadisticaDAO extends baseDAO {

    var $table = 'estadisticas';
    var $id    = 'estadistica_k';

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
        
    }
    
    
    function setFaceBook($e)
    {
        
        $this->_update(
                       array("facebook" => $e),
                       array($this->id => "1")
                       );
    }
    

    function setTwitter($e)
    {
        
        $this->_update(
                       array("twitter" => $e),
                       array($this->id => "1")
                       );
    }    
    
 
 
    function setVisitas($e)
    {
        
        $this->_update(
                       array("visitas" => $e),
                       array($this->id => "1")
                       );
    }    
     
     
 
    function setBoletin($e)
    {
        
        $this->_update(
                       array("boletin" => $e),
                       array($this->id => "1")
                       );
    }        
     
     
     function getFacebook()
     {
	
	$row = $this->_findById(1);
	return $row->facebook;
     }
 
 
 
     function getTwitter()
     {
	
	$row = $this->_findById(1);
	return $row->twitter;
     }    
    
    
     function getVisitas()
     {
	
	$row = $this->_findById(1);
	return $row->visitas;
     }    
    
    
     function getBoletin()
     {
	
	$row = $this->_findById(1);
	return $row->boletin;
     }     
    
       
}
?>